.\" generated with Ronn-NG/v0.8.0
.\" http://github.com/apjanke/ronn-ng/tree/0.8.0
.TH "TERMINUSDB" "1" "December 2020" "" ""
.SH "NAME"
\fBterminusdb\fR \- command line interface to the terminusdb Graph DBMS
.SH "SYNOPSIS"
\fBterminusdb [command subcommand positional_arguments] flags\fR
.SH "DESCRIPTION"
The terminusdb(1) command line tool allows users to interact with a database, allowing common operations such as querying (and updating), database creation, data ingestion and maintainence\.
.SH "COMMANDS"
terminusdb accepts a command, sometimes followed by a subcommand\. The accepted commands are given here, along with their arguments\.
.SS "help"
\fBterminusdb help\fR
.P
Display help regarding terminusdb\.
.TP
\fB\-m\fR, \fB\-\-markdown\fR=[value]
generate help as markdown
.SS "test"
\fBterminusdb test OPTIONS\fR
.P
Run internal TerminusDB tests\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for \fBtest\fR command
.TP
\fB\-t\fR, \fB\-\-test\fR=[value]
Run a specific test
.SS "serve"
\fBterminusdb serve OPTIONS\fR
.P
Run the TerminusDB server\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for \fBserve\fR command
.TP
\fB\-i\fR, \fB\-\-interactive\fR=[value]
run server in interactive mode
.SS "list"
\fBterminusdb list OPTIONS\fR
.P
List databases\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBlist\fR command
.SS "optimize"
\fBterminusdb optimize OPTIONS\fR
.P
Optimize a database (including \fIsystem and\fRmeta)\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBoptimize\fR command
.SS "query"
\fBterminusdb query QUERY OPTIONS\fR
.P
Query a database\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBquery\fR command
.TP
\fB\-m\fR, \fB\-\-message\fR=[value]
message to associate with the commit
.TP
\fB\-a\fR, \fB\-\-author\fR=[value]
author to place on the commit
.SS "push"
\fBterminusdb push DB_SPEC\fR
.P
Push a branch\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBpush\fR command
.TP
\fB\-b\fR, \fB\-\-branch\fR=[value]
set the origin branch for push
.TP
\fB\-e\fR, \fB\-\-remote\-branch\fR=[value]
set the branch on the remote for push
.TP
\fB\-r\fR, \fB\-\-remote\fR=[value]
the name of the remote to use
.TP
\fB\-x\fR, \fB\-\-prefixes\fR=[value]
send prefixes for database
.TP
\fB\-u\fR, \fB\-\-user\fR=[value]
the user on the remote
.TP
\fB\-p\fR, \fB\-\-password\fR=[value]
the password on the remote
.SS "clone"
\fBterminusdb clone URI <DB_SPEC>\fR
.P
Clone a database (into DB_SPEC)\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBclone\fR command
.TP
\fB\-u\fR, \fB\-\-user\fR=[value]
the user on the remote
.TP
\fB\-p\fR, \fB\-\-password\fR=[value]
the password on the remote
.TP
\fB\-o\fR, \fB\-\-organization\fR=[value]
organizational owner of the cloned database
.TP
\fB\-l\fR, \fB\-\-label\fR=[value]
label to use for this database
.TP
\fB\-c\fR, \fB\-\-comment\fR=[value]
long description of the cloned database
.TP
\fB\-b\fR, \fB\-\-public\fR=[value]
whether the cloned database is to be public
.SS "pull"
\fBterminusdb pull BRANCH_SPEC\fR
.P
Pull a branch from a database\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBpull\fR command
.TP
\fB\-e\fR, \fB\-\-remote\-branch\fR=[value]
set the branch on the remote for push
.TP
\fB\-r\fR, \fB\-\-remote\fR=[value]
the name of the remote to use
.TP
\fB\-u\fR, \fB\-\-user\fR=[value]
the user on the remote
.TP
\fB\-p\fR, \fB\-\-password\fR=[value]
the password on the remote
.SS "branch create"
\fBterminusdb branch create BRANCH_SPEC OPTIONS\fR
.P
Create a branch\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBbranch create\fR sub command
.TP
\fB\-o\fR, \fB\-\-origin\fR=[value]
the origin branch to use
.SS "branch delete"
\fBterminusdb branch delete BRANCH_SPEC OPTIONS\fR
.P
Delete a branch\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBbranch delete\fR sub command
.SS "db create"
\fBterminusdb db create DATABASE_SPEC OPTIONS\fR
.P
Create a database\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBdb create\fR sub command
.TP
\fB\-o\fR, \fB\-\-organization\fR=[value]
organizational owner of the database
.TP
\fB\-l\fR, \fB\-\-label\fR=[value]
label to use for this database
.TP
\fB\-c\fR, \fB\-\-comment\fR=[value]
long description of this database
.TP
\fB\-p\fR, \fB\-\-public\fR=[value]
whether this database is to be public
.TP
\fB\-k\fR, \fB\-\-schema\fR=[value]
whether to use a schema
.TP
\fB\-d\fR, \fB\-\-data\-prefix\fR=[value]
uri prefix to use for data
.TP
\fB\-s\fR, \fB\-\-schema\-prefix\fR=[value]
uri prefix to use for schema
.TP
\fB\-x\fR, \fB\-\-prefixes\fR=[value]
additional defined prefixes in JSON
.SS "db delete"
\fBterminusdb db delete DATABASE_SPEC OPTIONS\fR
.P
Delete a database\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBdb delete\fR sub command
.TP
\fB\-o\fR, \fB\-\-organization\fR=[value]
organizational owner of the database
.TP
\fB\-f\fR, \fB\-\-force\fR=[value]
force the deletion of the database (unsafe)
.SS "store init"
\fBterminusdb store init OPTIONS\fR
.P
Initialize a store for TerminusDB\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBstore init\fR sub command
.TP
\fB\-k\fR, \fB\-\-key\fR=[value]
key to use for admin login
.TP
\fB\-f\fR, \fB\-\-force\fR=[value]
force the creation of a new store even when one already exists
.SS "csv list"
\fBterminusdb csv list DB_SPEC\fR
.P
List CSVs in the given DB\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBcsv load\fR sub command
.SS "csv delete"
\fBterminusdb csv delete DB_SPEC FILE OPTIONS\fR
.P
Delete a CSV file from the given database\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBcsv load\fR sub command
.TP
\fB\-m\fR, \fB\-\-message\fR=[value]
message to associate with the commit
.TP
\fB\-a\fR, \fB\-\-author\fR=[value]
author to place on the commit
.SS "csv load"
\fBterminusdb csv load DB_SPEC FILES OPTIONS\fR
.P
Load a CSV file (appends new lines if already existing)\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBcsv load\fR sub command
.TP
\fB\-m\fR, \fB\-\-message\fR=[value]
message to associate with the commit
.TP
\fB\-a\fR, \fB\-\-author\fR=[value]
author to place on the commit
.SS "csv update"
\fBterminusdb csv update DB_SPEC FILES OPTIONS\fR
.P
Update a CSV file (equivalent to delete / load but with a minimal delta)\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBcsv update\fR sub command
.TP
\fB\-m\fR, \fB\-\-message\fR=[value]
message to associate with the commit
.TP
\fB\-a\fR, \fB\-\-author\fR=[value]
author to place on the commit
.SS "csv dump"
\fBterminusdb csv dump DB_SPEC FILES OPTIONS\fR
.P
Dump a CSV file from the database\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBcsv dump\fR sub command
.TP
\fB\-o\fR, \fB\-\-output\fR=[value]
file name to use for csv output
.SS "remote add"
\fBterminusdb remote add DATABASE_SPEC REMOTE_NAME REMOTE_LOCATION OPTIONS\fR
.P
Add a remote\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBremote add\fR sub command
.SS "remote remove"
\fBterminusdb remote delete DATABASE_SPEC REMOTE_NAME OPTIONS\fR
.P
Remove a remote\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBremote remove\fR sub command
.SS "remote set\-url"
\fBterminusdb remote set\-url DATABASE_SPEC REMOTE_NAME REMOTE_LOCATION OPTIONS\fR
.P
Set the URL of a remote\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBremote set\-url\fR sub command
.SS "remote get\-url"
\fBterminusdb remote get\-url DATABASE_SPEC REMOTE_NAME OPTIONS\fR
.P
Get the URL of a remote\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBremote get\-url\fR sub command
.SS "remote list"
\fBterminusdb remote list DATABASE_SPEC OPTIONS\fR
.P
List remotes\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBremote list\fR sub command
.SH "SYNTAX"
The designation of databases, repositories, the associated commit graph of a database, and various graphs as used in the above command requires the use of an appropriate descriptor path\.
.TP
\fB_system\fR
This is the system meta\-data, which contains the user information, organization information and database records\.
.TP
\fB<organization>/<database>\fR
This is the most basic descriptor path and actually refers to the more specific default path \fB<organization>/<database>/local/branch/main\fR\.
.TP
\fB<organization>/<database>/_meta\fR
This is the repository graph associated with \fBdatabase\fR\. It contains information about the local repository and all known remotes\.
.TP
\fB<organization>/<database>/<repository>\fR
This is a longer form database designator which specifies which respository we would like to address\. It refers implicitly to \fB<organization>/<database>/<repository>/branch/main\fR\.
.TP
\fB<organization>/<database>/<repository>/_commits\fR
The commit graph associated with a given database\. This graph contains metadata about branch histories with their commit objects including the authorship and time\.
.TP
\fB<organization>/<database>/<repository>/branch/<branch>\fR
The most specific branch descriptor, allows you to address a branch other than main\.
.TP
\fB<organization>/<database>/<repository>/commit/<commit>\fR
The descriptor which allows an individual commit to be addressed directly\.
.SH "ENVIRONMENT"
.TP
\fBTERMINUSDB_SERVER_NAME\fR
Set the servername to use for\fBterminusdb serve\fR\. Default is \fB127\.0\.0\.1\fR\.
.TP
\fBTERMINUSDB_SERVER_PORT\fR
Set the port to use for\fBterminusdb serve\fR\. Default is \fB6363\fR\.
.TP
\fBTERMINUSDB_SERVER_WORKERS\fR
Set the number of worker threads to use for \fBterminusdb serve\fR\. Default is \fB8\fR\.
.TP
\fBTERMINUSDB_SERVER_MAX_TRANSACTION_RETRIES\fR
Set the transaction retry count\. Default is \fB3\fR\.
.TP
\fBTERMINUSDB_SERVER_DB_PATH\fR
Set the location of the storage volume to be used by \fBterminusdb\fR operations\. Can be addressed relative to current path using \fB\./\fR\fIpath\fR\. Default is \fB\./storage/db\fR\.
.TP
\fBTERMINUSDB_SERVER_JWT_PUBLIC_KEY_PATH\fR
Set the public key path for JWT\. Default is \fB\'\'\fR\.
.TP
\fBTERMINUSDB_SERVER_JWT_PUBLIC_KEY_ID\fR
Set the public key identifier for JWT\. Default is \fB\'\'\fR\.
.TP
\fBTERMINUSDB_CONSOLE_BASE_URL\fR
Set the console javascript load URL\. Default is \fBhttps://dl\.bintray\.com/terminusdb/terminusdb/dev\fR\.
.TP
\fBTERMINUSDB_HTTPS_ENABLED\fR
If \fBtrue\fR then use HTTPS for all API operations\. Default is \fBtrue\fR\.
.TP
\fBTERMINUSDB_SSL_CERT\fR
Path to SSL certificate if using HTTPS\.
.TP
\fBTERMINUSDB_SSL_CERT_KEY\fR
Path to SSL certificate key if using HTTPS\.
.TP
\fBTERMINUSDB_AUTOLOGIN_ENABLED\fR
If \fBtrue\fR then attempt to login automatically with default password\. Default is \fBtrue\fR\.
.TP
\fBTERMINUSDB_SERVER_PACK_DIR\fR
Location of the prolog pack directory if loading third party modules\.
.TP
\fBTERMINUSDB_SERVER_TMP_PATH\fR
Path to use for temporary files\.
.TP
\fBTERMINUSDB_IGNORE_REF_AND_REPO_SCHEMA\fR
Assume that ref and repo operations are inherently correct\.
.SH "EXIT STATUS"
.TP
0
Successfully program execution\. Associated with \fBapi:success\fR\.
.TP
1
A generic failure of the API to carry out the operation\. Associated with \fBapi:failure\fR\.
.TP
2
The resource which was being requested was not found\. Associated with \fBapi:not_found\fR\.
.TP
13
The user attempted to carry out an operation without appropriately authorizing or without permission\. Associated with \fBapi:unauthorized\fR or \fBapi:forbidden\fR\.
.TP
13
Unauthorized access attempted\. Associated with \fBapi:unauthorized\fR\.
.TP
126
An api command was attempted which is not possible\. Associated with \fBapi:method_not_allowed\fR\.
.TP
131
Internal server error\. Associated with \fBapi:server_error\fR\.
.SH "EXAMPLES"
.TP
\fBterminusdb db create admin/foo\fR
Create a database in the organization \fBadmin\fR with the identifier \fBfoo\fR\.
.TP
\fBterminusdb db create admin/foo \-\-label="Foo"\fR
Create a database in the organization \fBadmin\fR with the identifier \fBfoo\fR and name \fBFoo\fR\.
.SH "COPYRIGHT"
TerminusDB is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 (GPLv3) as published by the Free Software Foundation\.
.P
TerminusDB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\. See the GNU General Public License for more details\.
.P
You should have received a copy of the GNU General Public License along with TerminusDB\. If not, see \fI\%https://www\.gnu\.org/licenses/\fR\.
.SH "AUTHORS"
Gavin Mendel\-Gleason \fI\%mailto:gavin@terminusdb\.com\fR
.P
Matthijs van Otterdijk \fI\%mailto:matthijs@terminusdb\.com\fR
.P
Robin de Rooij \fI\%mailto:robin@terminusdb\.com\fR
.P
Anne Ogborn \fI\%mailto:anne@swi\-prolog\.org\fR
.P
Dmytri Kleiner \fI\%mailto:dk@terminusdb\.com\fR
.P
Paulo Moura \fI\%https://github\.com/pmoura\fR
